package com.dq.domain.sys.user.user.base;

import com.dq.domain.base.BaseEntity;
import com.dq.validator.group.AddGroup;
import com.dq.validator.group.UpdateGroup;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import javax.validation.constraints.NotBlank;

/**
 * @创建人 gewenzhen
 * @创建时间 2019/9/7
 * @描述 登陆用户
 */
@Data
@MappedSuperclass
public class SysLoginUser extends BaseEntity {
    /**
     * 用户名
     */
    @NotBlank(message = "用户名不能为空", groups = {AddGroup.class, UpdateGroup.class})
    @Column(unique = true)
    public String username;

    /**
     * 密码
     */
    @NotBlank(message = "密码不能为空", groups = {AddGroup.class, UpdateGroup.class})
    public String password;
}
